package com.bw.spark02.rdd.transformation

import org.apache.spark.{SparkConf, SparkContext}


object RDD_30_glom {
    
    def main(args: Array[String]): Unit = {
    
        // 初始化编程入口
        val sparkConf = new SparkConf()
        sparkConf.setMaster("local")
        sparkConf.setAppName("RDD_Test")
        val sc = new SparkContext(sparkConf)
    
        val rdd = sc.parallelize(1 to 20, 3)
        
        rdd.glom().collect().foreach(x => {
            for(a <- x) print(a + "\t")
            println("")
        })
    }
}
